package org.shangrila.app.wechat.utils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "weixin")
public class AccessWxUtil {
	
	public static String accessToken;
	public static String wxUserId;
	public static String mailAccessToken;
	public static String appid;
	public static String secret;
	public static String mailsecret;
	public static String agentid;
	
	@Value("${weixin.appid}")
	public void setAppid(String appid) {
		AccessWxUtil.appid = appid;
	}
	@Value("${weixin.secret}")
	public void setSecret(String secret) {
		AccessWxUtil.secret = secret;
	}
	@Value("${weixin.agentid}")
	public void setAgentid(String agentid) {
		AccessWxUtil.agentid = agentid;
	}
	@Value("${weixin.mailsecret}")
	public void setMailsecret(String mailsecret) {
		AccessWxUtil.mailsecret = mailsecret;
	}
}
